	package com.tuling.springcloud.config;

	import org.springframework.cloud.client.loadbalancer.LoadBalanced;
	import org.springframework.context.annotation.Bean;
	import org.springframework.context.annotation.Configuration;
	import org.springframework.web.client.RestTemplate;

	@Configuration
	public class CommonConfig {

		/*@Bean
		public RestTemplate restTemplate(){
			return new RestTemplate();
		}*/

		@Bean
		@LoadBalanced //轮询调用，作用是负载均衡，注意这个负载均衡的代码一定是写在调用方
		public RestTemplate restTemplate() {
			return new RestTemplate();
		}
	}
